<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>

<form action="/fileUpload" method="post" enctype="multipart/form-data">
    <label>上传图片</label>
    <input type="file" name="file"/>
    <input type="submit" value="上传"/>
</form>
[[${filename}]]
<p>图片:</p>
<img th:src="@{D:/springboot-pagehelper/src/main/resources/static/img/th:text=${filename}} ">
</body>
</html>